﻿using Nuwanda.Common;
using Nuwanda.TfsSpotlight.Shell.Services.Interfaces;
using Nuwanda.TfsSpotlight.Views.Servers;
using StructureMap;

namespace Nuwanda.TfsSpotlight.Commands
{
    /// <summary>Conects to the selected server</summary>
    [Author("Bartłomiej Legiędź")]
    [Pluggable(CommandsNames.Connect)]
    public class ConnectCommand : ICommand
    {
        private IServersPresenter ServersPresenter { get; set; }

        public ConnectCommand( IServersPresenter serversPresenter)
        {
            this.ServersPresenter = serversPresenter;
        }

        public void Execute()
        {
            this.ServersPresenter.HandleConnectSelected();
        }
    }
}